Virtual machines (VMs) can be migrated between different computing systems (referred to herein as hosts). When migrating a VM, memory, storage, and network connectivity of the VM are transferred from the original host to the destination host. In a pre-copy memory migration, a hypervisor (i.e., the interface between the VM and the host hardware) typically copies the memory pages from the current host to the destination host while the VM continues to execute on the host. In a post-copy memory migration, the VM is suspended at the source. While the VM is suspended, a minimal subset of the execution state of the VM (CPU state, registers and, optionally, non-pageable memory) is transferred to the destination host. The VM is then resumed on destination host. Although the VM is now executing on a different host, to the perspective of the user, there may be no change except the VM may have been unavailable while being migrated (if the VM was paused).
Many hosts use accelerators to perform specialized functions such as graphics processing, cryptography, image processing, and the like. These accelerators include hardware elements that can be separate from the processors in the host. For example, the accelerators may be disposed on one or more FPGAs mounted in the host. When executing applications in the VM, the host may offload some of the processing tasks assigned to a processor to an accelerator which then performs the tasks and returns the processed data to the processor. However, when migrating VMs, any tasks currently being performed by the accelerators are lost. Thus, the new host has to restart the task when resuming the migrated VM.